/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package include.fxml;

import UML.ClassDiagram;
import graphic.DiagramPane;
import javafx.scene.control.Tab;

/**
 *
 * @author David
 */
public class DiagramTab extends Tab {

  // TODO: Juste pour tester.
  public DiagramTab(){
    
    super("MucK");
    initialize(new ClassDiagram("MucK"));
  }
  
  public DiagramTab(ClassDiagram classDiagram) {
    super(classDiagram.getName());
    initialize(classDiagram);
  }
  
  private void initialize(ClassDiagram classDiagram) {
    setContent(new DiagramPane(classDiagram));
  }
  
  /**
   * Get the DiagramPane associed with this tab.
   * @return the DiagramPane associed with this tab.
   */
  public DiagramPane getDiagramPane()
  {
    return (DiagramPane)getContent();
  }
}
